package com.turing.post.organization.util;

import java.math.BigInteger;
import java.util.Date;
import java.util.List;
import javax.ejb.Local;
import javax.ejb.Remote;

import com.turing.post.util.PCPSApplicationException;
import com.turing.post.util.PCPSWebInput;

/**
 * 凭证出入库明细表接口
 * 
 * @author wzd
 * @2013-03-13
 */
@Remote
@Local
public interface VoucherStockDetailDao {

	/**
	 * 根据条件查询凭证出入库明细列表
	 * 
	 * @param BranchNo
	 *            机构号
	 * @param tranType
	 *            交易类型
	 * @param voucherId
	 *            凭证种类
	 * @param startDate
	 *            起始日期
	 * @param endDate
	 *            终止日期
	 * @param page
	 *            页码
	 * @return 凭证出入库明细列表
	 */
	public List<VoucherStockDetail> getVoucherStockDetailList(
			PCPSWebInput webInput, String BranchNo, String tranType,
			BigInteger voucherId, String startDate, String endDate, Integer page);

	/**
	 * 根据条件查询凭证出入库明细记录数
	 * 
	 * @param BranchNo
	 *            机构号
	 * @param tranType
	 *            交易类型
	 * @param voucherId
	 *            凭证种类
	 * @param startDate
	 *            起始日期
	 * @param endDate
	 *            终止日期
	 * @return 凭证出入库明细录数
	 */
	public BigInteger getVoucherStockDetailListTotal(PCPSWebInput webInput,
			String BranchNo, String tranType, BigInteger voucherId,
			String startDate, String endDate);

	/**
	 * 新增凭证出入库明细
	 * 
	 * @param VoucherStockDetail
	 *            凭证出入库明细
	 * @throws PCPSApplicationException
	 */
	public void insertVoucherStockDetail(VoucherStockDetail voucherStockDetail)
			throws PCPSApplicationException;

	/**
	 * 删除凭证出入库明细
	 * 
	 * @param VoucherStockDetail
	 *            凭证出入库明细
	 * @throws PCPSApplicationException
	 */
	/**
	 * 删除凭证出入库明细表
	 * 
	 * @param VoucherStockDetail
	 *            凭证出入库明细表
	 * @throws PCPSApplicationException
	 */
	public void deleteVoucherStockDetail(VoucherStockDetail voucherStockDetail)
			throws PCPSApplicationException;

	/**
	 * 汇总某机构某日凭证日结数据
	 * 
	 * @param issueCompanyNo
	 * @param branchNo(可选)
	 * @param tranDate
	 * @return
	 */
	public List<Object[]> getVoucherStockDaySettlementByBranchNoAndTranDate(
			String issueCompanyNo, String branchNo, Date tranDate);
	/**
	 * 根据id，发卡商号检索迁移明细列表
	 */
	public List<VoucherStockDetail> getVoucherStockDetailByid(String IoOrderId,String issuecompanyno);
	/**
	 * 根据id修改状态
	 */
	public void updateVoucherStockDetail(BigInteger ioOrderId)throws PCPSApplicationException;
}
